import os, sys, string

class YADictData:

    def setConnection(self, connection, databaseName):
        self.connection = connection
        if connection == None:
            self.currentDatabaseName = "None"
        else:
            self.currentDatabaseName = databaseName
        
    def __init__ (self, arguments):
        
        self.repositoryDatabase = "/usr/share/yadict"
        self.limitCompletion = 5
        self.defaultDatabase = None
        self.connection = None
        self.currentDatabaseName = "None"
        
        if len(arguments) == 4:
            self.repositoryDatabase = arguments[1]
            self.limitCompletion = arguments[2]
            self.defaultDatabase = arguments[3]
        elif len(arguments) == 3:
            self.repositoryDatabase = arguments[1]
            self.limitCompletion = arguments[2]
        elif len(arguments) == 2:
            self.repositoryDatabase = arguments[1]
            
        print self.repositoryDatabase
        print self.limitCompletion     
        print self.defaultDatabase
        print self.currentDatabaseName
            
